package com.hailiang.scheduler;

import com.hailiang.reptile.JedisUtil;
import redis.clients.jedis.Jedis;

public class UrlSchedulerImp implements Scheduler{

    @Override
    public void push(String key, String value) {
        Jedis jedis = JedisUtil.getJedis();
        jedis.lpush(key,value);
        jedis.close();
    }

    @Override
    public String pull(String key) {

        Jedis jedis = JedisUtil.getJedis();
       return jedis.rpop("url");
    }
}
